From: Carlos Garnacho Date: Tue, 26 Apr 2022 11:09:01 +0000 (+0200) Subject: overview: Avoid entering in overview mode during display grab op X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~480^2^2~14 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=378406e1f051d355341ccfcc66d10a09bb220851;p=gnome-shell.git overview: Avoid entering in overview mode during display grab op ClutterGrab and display grab operations are pretty much mutually exclusive, but there's no mechanism to ensure a ClutterGrab does not step on top of an existing grab operation. This looks the only place that could trigger that (e.g. start dragging window, then move pointer to top/left corner), so skip over the situation here explicitly. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5397 Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5181 Part-of: --- diff --git a/js/ui/overview.js b/js/ui/overview.js index 96ccde521..4e86860ca 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -448,8 +448,14 @@ var Overview = class { if (this._shown) { let shouldBeModal = !this._inXdndDrag; if (shouldBeModal && !this._modal) { - let actionMode = Shell.ActionMode.OVERVIEW; - let grab = Main.pushModal(global.stage, { actionMode }); + if (global.display.get_grab_op() !== Meta.GrabOp.NONE) { + this.hide(); + return false; + } + + const grab = Main.pushModal(global.stage, { + actionMode: Shell.ActionMode.OVERVIEW, + }); if (grab.get_seat_state() !== Clutter.GrabState.NONE) { this._grab = grab; this._modal = true;